<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/pages/common/component.jsp"%>
<html>
<head>
    <title>修改行动信息</title>
<head>

<script type="text/javascript">

$(document).ready(function() {
	// 开始时间
	configDate('startDate', '<fmt:formatDate value="${objPlanActionVO.startDate }" pattern="yyyy-MM-dd" type="date"/>', 'yy-mm-dd');
	// 结束时间
	configDate('endDate', '<fmt:formatDate value="${objPlanActionVO.endDate }" pattern="yyyy-MM-dd" type="date"/>', 'yy-mm-dd');
    // 校验主表单
    $("#planActionForm").validationEngine();
});

// 返回账户列表
function back2list(){
	if(confirm("数据没有保存!确认将丢失当前表单数据!")){
		window.location.href = "planActionAction.do?method=list"
	}else{
		return ;
	}
}

</script>
	
</head>
  
  <body>
   
   <html:form styleId="planActionForm" method="post" action="planActionAction.do">
    <input type="hidden" name="method" value="update"/>
    <input type="hidden" id="action_planResourceId" name="planResourceId" value="${objPlanActionVO.planResource.planResourceId }"/>
    <br/><br/>
    <table width="80%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
		<tr align="center" bgcolor="#FAFAF1" height="22">
			<td colspan="2"><b>修改行动</b></td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">行动名称</td>
			<td width="30%">
				<input id="planActionName" name="planActionName" style='width:40%;' value="${objPlanActionVO.planActionName }"/>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">行动类型</td>
			<td width="30%">
				<select name="resourceType" style="width:40%;">
					<option value="<%=Constants.PLAN_ACTIONTYPE_CULTURE%>" ${objPlanActionVO.actionType==1 ? 'selected' : ''}>文化修养(CULTURE)</option>
					<option value="<%=Constants.PLAN_ACTIONTYPE_HABIT%>" ${objPlanActionVO.actionType==2 ? 'selected' : ''}>个人习惯(HABIT)</option>
					<option value="<%=Constants.PLAN_ACTIONTYPE_BODY%>" ${objPlanActionVO.actionType==3 ? 'selected' : ''}>体格锻炼(BODY)</option>
				</select>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td>开始日期</td>
			<td>
				<input id="startDate" name="startDate" style='width:40%;' readonly value="${objPlanActionVO.startDate }"/>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td>结束日期</td>
			<td>
				<input id="endDate" name="endDate" style='width:40%;' readonly value="${objPlanActionVO.endDate }"/>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td>优先级</td>
			<td>
				<select name="priority" id="priority" style="width:40%;">
					<option value="<%=Constants.PLAN_PRIORITY_LOW %>" ${objPlanActionVO.priority==1 ? 'selected' : ''}>低</option>
					<option value="<%=Constants.PLAN_PRIORITY_MIDDLE %>" ${objPlanActionVO.priority==2 ? 'selected' : ''}>中</option>
					<option value="<%=Constants.PLAN_PRIORITY_HIGH %>" ${objPlanActionVO.priority==3 ? 'selected' : ''}>高</option>
				</select>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td>经验值</td>
			<td>
				<input name="totalExp" style='width:40%;' value="${objPlanActionVO.totalExp }"/>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td>备注</td>
			<td>
				<input name="note" style='width:40%;' value="${objPlanActionVO.note }"/>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" value="修改"/>
			</td>
		</tr>
    </table>
   </html:form> 
    
  </body>
</html>
